#include <iostream>
#include "Externs.hpp"

#include <swarm/type_setup.h>
#include <swarm/Locale.h>
#include <swarm/Latch.h>
#include <swarm/Bool.h>
#include <swarm/Runtime.h>
#include <swarm/Resource.h>
#include <swarm/Scheduler.h>
#include <swarm/Env.h>
#include <swarm/Identifiable.h>
#include <swarm/util/atomic.h>


swarm_CodeletDesc_IMPL_NOCANCEL_NOCAST(finalize, finalize, swarm_c_void, swarm_c_void)
std::cerr << "Start Finalize" << std::endl;
#ifndef STATIC_ALLOC
std::cerr << "Start Freeing" << std::endl;
free(A);
free(Acheck);
#endif // STATIC_ALLOC
swarm_dispatch(NEXT, NEXT_THIS, NULL, NULL, NULL);
swarm_CodeletDesc_IMPL_END;
